package com.lcb.sentinel.myhandler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.alibaba.fastjson.JSONObject;

/****
 * @Author:刘长柏
 * @Date: 2021-02-03 11:30
 * @Description: 自定义
 *****/
public class CustomerBlockHandler {

    public static String handlerException(BlockException exception) {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("code", 444);
        jsonObject.put("message", "按自定义自定义全局方法handlerException 1");

        return jsonObject.toString();
    }

    public static String handlerException2(BlockException exception) {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("code", 444);
        jsonObject.put("message", "按自定义自定义全局方法handlerException 2");

        return jsonObject.toString();
    }

}
